package com.sykj.manage.web;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sykj.manage.model.SysUser;
import com.sykj.manage.service.SysUserService;

@Controller
@RequestMapping("sysuser")
public class SysUserController {

	@Autowired
	SysUserService userService;
	
	@RequestMapping("findSysUser")
	@ResponseBody
	public Map<String, Object> findSysUser(Model model,SysUser sysUser) {
		List<SysUser> findSysUser = userService.findSysUser(sysUser);
//		model.addAttribute("sysuserData", findSysUser);
		Map<String, Object> result = new HashMap<String, Object>();
		result.put("count", findSysUser.size());
		result.put("msg", null);
		result.put("code", 0);
		result.put("data", findSysUser);
		return result;
		
	}
	
}
